package com.schrodinger.zwebservice.axis2.client;

import com.schrodinger.zwebservice.axis2.client.wsconfig.WSConfigManager;

/**
 * 使用舉例：一般是在service層調用
 * 
 * @author asus
 * 
 */
public class Axis2ClientTest2 {

	// WS远程调用服务标志
	private static final String SERVICE_MARK = "ipes";
	// WS远程调用的服务名称
	private static final String SERVICE_NAME = "projectCommonServer";
	// WS远程调用的类的全路径名称或者生成wsdl的targetNameSpace
	private static final String TARGET_CLASS = "http://server.project.webservice.server.datatransfer.com";

	public String getWSProjectList() throws Exception {		
		String resultStr = Axis2Client.invokeMethodHasReturn(SERVICE_MARK,
				SERVICE_NAME, TARGET_CLASS, "getWSProjectList", new Object[] {});
		return resultStr;
	}

	public static void main(String[] args) throws Exception {
		Axis2ClientTest2 axis2ClientTest = new Axis2ClientTest2();
		WSConfigManager.loadWSConfig();
		String projectList = axis2ClientTest.getWSProjectList();
		System.out.println("ProjectList:" + projectList);
	}

}
